//
//  SEExamineRecordChildBaseController.swift
//  SmartEyeForPatient
//
//  Created by QDSG on 2021/4/22.
//

import UIKit

class SEExamineRecordChildBaseController: SEBaseViewController {
    
    override func setupUI() {
        super.setupUI()

        view.backgroundColor = UIColor.white
        
        view.addSubview(tableView)
        view.addSubview(cancelReserveView)

        cancelReserveView.snp.makeConstraints { (make) in
            make.left.top.equalTo(15)
            make.right.equalToSuperview().offset(-15)
            make.height.equalTo(50)
        }

        tableView.snp.makeConstraints { (make) in
            make.edges.equalToSuperview().priority(.low)
            make.top.equalTo(cancelReserveView.snp.bottom)
        }
    }
    
    // MARK: - getter
    
    lazy var cancelReserveView = UINib.loadViewFrom(SEExamineRecordCancelView.self)
    
    lazy var tableView: UITableView = {
        let tableView = UITableView(frame: .zero, style: .plain)
        tableView.backgroundColor = .white
        tableView.tableFooterView = UIView(frame: CGRect(x: 0, y: 0, width: 0, height: 80 + 65))
        tableView.separatorStyle = .none
        tableView.showsVerticalScrollIndicator = false
        tableView.delegate = self
        
        return tableView
    }()
}

extension SEExamineRecordChildBaseController: UITableViewDelegate {}
